import React from 'react';
import { useEffect, useState } from 'react';
import { Button } from 'dw-mx';

export default function TaskPlanWindow(props) {
    const [searchPlanInfo, updateSearchPlanInfo] = useState({});

    const update = () => {
        updateSearchPlanInfo({
            jhbh: Math.random() + '',
            rwbh: Math.random() + '',
            cplx: Math.random() + '',
            jhlx: Math.random() + '',
            strmc: Math.random() + '',
            zgrmc: Math.random() + ''
        });
    };

    return (
        <div>
            <ul>
                <li>计划编号：{searchPlanInfo.jhbh || ''}</li>
                <li>任务编号：{searchPlanInfo.rwbh || ''}</li>
                <li>产品类型：{searchPlanInfo.cplx || ''}</li>
                <li>计划类型：{searchPlanInfo.jhlx || ''}</li>
                <li>受托人名称：{searchPlanInfo.strmc || ''}</li>
                <li>账管人名称：{searchPlanInfo.zgrmc || ''}</li>
                <li>托管人名称：{searchPlanInfo.tgrmc || ''}</li>
            </ul>
            <Button onClick={() => update()}>换</Button>
        </div>
    );
}